#include "Log.hpp"
#include "Task.hpp"
#include "ThreadPool.hpp"
#include <iostream>
#include <memory>
using namespace std;
int main()
{
    EnableScreen();
    int n = 10;
    while (n)
    {
        sleep(1);
        Task t(1, 1);
        threadpool<Task>::GetInstance()->Equeue(t);
        LOG(INFO, "equeue a task,%s\n", t.debug().c_str());
        sleep(1);
        n--;
    }

    threadpool<Task>::GetInstance()->Stop();
    LOG(INFO, "threadpool stop.\n");

    return 0;
}